//Base do Menu g_SpawnMenu
function SpawnDermaGUI()

//Apagar SpawnMenu do rabeta do Garry ^^
	if ( g_SpawnMenu ) then
	
		g_SpawnMenu:Remove()
		g_SpawnMenu = nil
	
	end

local ScrenSizeX = ScrH()-100
local ScrenSizeY = ScrW()-800

//Janela Principal
local SpawnDerma = vgui.Create("DFrame")
SpawnDerma:SetSize(ScrenSizeX, ScrenSizeY)
SpawnDerma:Center()
SpawnDerma:SetTitle("Main Menu")
SpawnDerma:SetVisible(true)
SpawnDerma:SetDraggable(true)
SpawnDerma:ShowCloseButton(true)
SpawnDerma:SetMouseInputEnabled(true)
SpawnDerma:SetKeyboardInputEnabled(true)
SpawnDerma:MakePopup()
//Gestor de Tabs 
local PropertySheet = vgui.Create( "DPropertySheet" )
PropertySheet:SetParent( SpawnDerma )
PropertySheet:SetPos( 5, 30 )
PropertySheet:SetSize( ScrenSizeX-150, ScrenSizeY-35 )

//Tab1
local SheetItemOne = vgui.Create( "DPanelList")
SheetItemOne:SetPos(5,30)
SheetItemOne:SetSize(360,360)
SheetItemOne:SetSpacing( 5 )
SheetItemOne:EnableHorizontal( false )
SheetItemOne:EnableVerticalScrollbar( true )

//Categorias de props
local SheetCATONE = vgui.Create("DCollapsibleCategory") 
SheetCATONE:SetSize( 200, 200 )
SheetCATONE:SetExpanded( 1 )
SheetCATONE:SetLabel( "Steel" ) 
SheetItemOne:AddItem( SheetCATONE )

local SheetCATTWO = vgui.Create("DCollapsibleCategory") 
SheetCATTWO:SetSize( 200, 200 )
SheetCATTWO:SetExpanded( 1 )
SheetCATTWO:SetLabel( "Wood" ) 
SheetItemOne:AddItem( SheetCATTWO )

local SheetCATTHREE = vgui.Create("DCollapsibleCategory") 
SheetCATTHREE:SetSize( 200, 200 )
SheetCATTHREE:SetExpanded( 1 )
SheetCATTHREE:SetLabel( "Junk" ) 
SheetItemOne:AddItem( SheetCATTHREE )

//Tab2
local SheetItemTwo = vgui.Create( "DPanelList")
SheetItemTwo:SetPos(5,30)
SheetItemTwo:SetSize(360,360)
SheetItemTwo:SetSpacing( 5 )
SheetItemTwo:EnableHorizontal( false )
SheetItemTwo:EnableVerticalScrollbar( true )




//Adicionar Tabs
PropertySheet:AddSheet( "Prop Market!", SheetItemOne, "gui/silkicons/user", false, false, "Garage sale, everything must go!!!" )
PropertySheet:AddSheet( "Black Market!", SheetItemTwo, "gui/silkicons/group", false, false, "Buy Your Tools of Doom here!!!" ) 

//Skin para a Janela Principal
function SpawnDerma:Paint()
surface.SetDrawColor(100,100,100,200)
surface.DrawRect(0,0,SpawnDerma:GetWide(),SpawnDerma:GetTall())
surface.DrawRect(4,4,SpawnDerma:GetWide()-10,SpawnDerma:GetTall()-10)
end

end
concommand.Add("SpawnDermaGUI",SpawnDermaGUI)


//Abrir o SpawnMenu com "q"	                              
function OpenWithSpawnKey()
SpawnDermaGUI()
end
hook.Add("OnSpawnMenuOpen","OpenSpawnMenu",OpenWithSpawnKey)


	                              




